package com.ys.erp.stage_mall_service.controller;

import com.ys.erp.framework.annotation.ResponseResult;
import com.ys.erp.framework.annotation.StageLoginEmp;
import com.ys.erp.framework.bean.dto.StageEmpDTO;
import com.ys.erp.stage_mall_service.bean.condition.OrderStatCon;
import com.ys.erp.stage_mall_service.bean.vo.ToShopOrderRefundStatVO;
import com.ys.erp.stage_mall_service.service.OrderStatService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lwj
 * @date 2025/5/19
 */
@ResponseResult
@RestController
@RequiredArgsConstructor
@RequestMapping("/manage/mall/order/stat")
@Tag(name = "订单统计相关接口", description = "订单统计相关接口")
public class OrderStatController {

    private final OrderStatService orderStatService;

    @PostMapping("/toShopOrderRefundStat")
    @Operation(summary = "到店付返款统计", description = "到店付返款统计")
    public ToShopOrderRefundStatVO toShopOrderRefundStat(@RequestBody @Valid OrderStatCon.ToShopOrderRefundStatCon con,
                                                         @StageLoginEmp StageEmpDTO empDto) {
        return orderStatService.shopRefundStat(empDto, con);
    }

}
